/**
 * 
 */
package nl.project.data;

/**
 * @author Wouter
 * 
 */

/**
 * 
 * This class contains all data regarding the appointments made.
 *
 */
public class Appointment {
	private int parentID;
	private int teacherID;
	private int studentID;
	
	/**
	 * contact is a String array where 
	 * [0] is the mail address of the specified parent
	 * [1] is the street address
	 * [2] is the zip code
	 * [3] is the city/town
	 * [4] is the phone number
	 */
	private String contact[] = new String[5];
	private int tableID;
	private int startTime;
	private int duration = 15;
	private int date;
	private String pref;
	
	/**
	 * {@link $waitingFailNotification[the notification tells if the waiting time exceeds the allowed 15 minutes]}
	 */
	private boolean waitingFailNotification = false;
	public int getParentID() {
		return parentID;
	}
	public void setParentID(int parentID) {
		this.parentID = parentID;
	}
	public int getTeacherID() {
		return teacherID;
	}
	public void setTeacherID(int teacherID) {
		this.teacherID = teacherID;
	}
	public int getStudentID() {
		return studentID;
	}
	public void setStudentID(int studentID) {
		this.studentID = studentID;
	}
	public String getContact() {
		String returnContact = (contact[0]+" "+contact[1]+" "+contact[2]+" "+contact[3]+" "+contact[4]).toString();
		return returnContact	;
	}
	public void setContact(String[] contact) {
		this.contact = contact;
	}
	public int getTableID() {
		return tableID;
	}
	public void setTableID(int tableID) {
		this.tableID = tableID;
	}
	public int getStartTime() {
		return startTime;
	}
	public void setStartTime(int startTime) {
		this.startTime = startTime;
	}
	public int getDate() {
		return date;
	}
	public void setDate(int date) {
		this.date = date;
	}
	public String getPref() {
		return pref;
	}
	public void setPref(String pref) {
		this.pref = pref;
	}
	public boolean isWaitingFailNotification() {
		return waitingFailNotification;
	}
	public void setWaitingFailNotification(boolean waitingFailNotification) {
		this.waitingFailNotification = waitingFailNotification;
	}
	@Override
	public String toString(){
		StringBuilder sb = new StringBuilder();
		String br = "<br>";
		sb.append("Ouder: ").append(parentID).append(br);
		sb.append("Leraar: ").append(teacherID).append(br);
		sb.append("Student: ").append(studentID).append(br);
		sb.append("Mail: ").append(contact[0]).append(br);
		sb.append("Adres: ").append(contact[1]).append(br);
		sb.append("Postcode: ").append(contact[2]).append(br);
		sb.append("Plaats: ").append(contact[3]).append(br);
		sb.append("Telefoon nummer: ").append(contact[4]).append(br);
		sb.append("Tafel: ").append(tableID).append(br);
		sb.append("Starttijd: ").append(startTime).append(br);
		sb.append("Tijdsduur: ").append(duration).append(br);
		sb.append("Dag: ").append(date).append(br);
		sb.append("Voorkeur: ").append(pref).append(br);
		
		return sb.toString();
	}
}
